<!--[*
// ----------------------------------------------------------------------
// Source file:  $Source: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_admin_structuretree.html,v $
//
// Last changes from:  $Author: landseer $
//
// Revision:           $Revision: 1.22 $
//
// Date of revision    $Date: 2005/03/22 13:03:40 $
//
// ----------------------------------------------------------------------
*]-->
<!--[ include file='pncommerce_admin_commonHeader.html' ]-->

<!--[pncGetCategoryTree]-->
<!--[pncUnfoldTree name='categories' data=$CategoryTree]-->
<div style="text-align:left;"><!--[pnml name='_PNC_STRUCTURETREEHOWTO' html=1]--></div>
<br />
<fieldset>
    <legend style="vertical-align: middle; font-weight: bold;">
        <!--[pnml name='_PNC_STRUCTURETREE' html=1 ]-->&nbsp;<a <!--[pncManualURL Chapter="208" OpenHelpWindow='1']-->> <!--[pnimg src="doc.gif" border='0' ]--></a>
    </legend>
    <br />
    <!--[assign var=maxdepth value=1]-->
    <table border='0'>
        <tr>
            <th>
                &nbsp;
            </th>
            <th>
                <!--[ pnml name='_PNC_CATEGORYNAMEID' ]-->
            </th>
            <th>
                <!--[ pnml name='_PNC_USEDTEMPLATE' ]-->
            </th>
            <th>
                <!--[ pnml name='_PNC_SELECTACTION' ]-->
            </th>
        </tr>
    <!--[ foreach item=Category from=$unfolded_categories ]-->
    <!--[assign var=parentID value=$Category.CatParent]-->
    <!--[assign var=tmp value=$Category.CategoryID]-->
    <!--[assign var=depth value=$Category.depth]-->
    <!--[if (($open[$parentID] eq 1) and ($depth<=$maxdepth))||($depth ==0)]-->
        <tr>
            <td>
               <!--[if $Category.depth>0]-->
                   <!--[pncGetCountableArray assign='count1' count=$Category.depth-1]-->
                   <!--[ foreach item=step from=$count1]-->
                            &nbsp;&nbsp;&nbsp;
                   <!--[/foreach]-->
                   <!--[ pnimg src="tree.gif" height="10" width="10" border="0" alt="tree" ]--> 
               <!--[/if]-->
               <!--[assign var=maxdepth value=$depth]-->
               <!--[if $Category.hasChildren]-->
                   <!--[if $Category.open eq 1]-->
                     <!--[assign var=maxdepth value=$depth+1]-->
                      <a href="<!--[pncUserModURL func=openclose mode=close id=$Category.CategoryID]-->"><img src="images/global/upb.gif" width="9" height="10" border="0" alt="-"></a>
                   <!--[else]-->
                      <a href="<!--[pncUserModURL func=openclose mode=open id=$Category.CategoryID]-->"><img src="images/global/downb.gif" width="9" height="10" border="0" alt="+"></a>
                   <!--[/if]-->
               <!--[else]-->
                    &nbsp;
               <!--[/if]-->

           </td>
            <td>
                <a href="<!--[pncAdminModURL func=structuretree open=$actOpen showCat=$Category.CategoryID]-->"><!--[$Category.Category]--> (<!--[ $Category.CategoryID ]-->)</a>
            </td>
            <td style="padding-left: 20px; padding-right: 20px;">
                <!--[ $Category.CatIntroTemplateDesc ]-->
            </td>
            <td style="padding-left: 20px; padding-right: 20px;">
                <a href="<!--[pncAdminModURL func=categoryedit CID=$Category.CategoryID Mode=edit]-->"><!--[pnml name='_PNC_EDIT' html=1]--></a>
            </td>
            <td style="padding-left: 20px; padding-right: 20px;">
                <a href="<!--[pncAdminModURL func=categoryrem CategoryID=$Category.CategoryID ]-->"><!--[pnml name='_PNC_DELETE' html=1]--></a>
            </td>
        </tr>
        <!--[if $showCat==$Category.CategoryID]-->
            <!--[pncGetItemsByCategory CategoryID=$Category.CategoryID]-->  
            <!--[if count($Items) > 0 ]-->
                <!--[foreach item=Item from=$Items]-->     
                <tr>
                    <td>&nbsp;</td>
                    <td>
                        <!--[ pnimg src="tree.gif" height="10" width="10" border="0" alt="tree" ]-->&nbsp;<a href="<!--[ pncUserModURL func=itemview ItemID=$Item.ID ]-->"><!--[$Item.Name]-->&nbsp;(<!--[$Item.SKU]-->)</a>
                    </td>
                    <td style="padding-left: 20px; padding-right: 20px;">
                        <!--[ $Category.ItemViewTemplateDesc ]-->
                    </td>
                    <td style="padding-left: 20px; padding-right: 20px;">
                        <!--[ pnsecgenauthkey assign=authkey ]-->
                        <a href="<!--[ pncAdminModURL func=itemedit authid=$authkey IID=$Item.ID Mode=edit ]-->"><!--[pnml name='_PNC_EDIT']--></a>
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <!--[/foreach]-->
            <!--[/if]-->
        <!--[/if]-->
    <!--[/if]-->
<!--[foreachelse]-->
<!--[pnml name="_PNC_NOCATEGORIESDEFINED"]-->
<!--[/foreach]-->
</table>
<br />
 </fieldset>  

<!--[ include file='pncommerce_admin_commonFooter.html' ]-->

<!--[*debug*]-->
